1. Technical Field
Embodiments described herein generally relate to processors. In particular, embodiments described herein generally relate to performing cryptography in processors.
2. Background Information
Cryptology is a technology often used to protect information (e.g., which is desired to be kept confidential or secret) in computer systems and other electronic devices. Cryptology generally involves using an algorithm (e.g., an elaborate mathematical cryptographic algorithm) and a cryptographic key (e.g., a string of bits) to protect the information. For example, encryption (sometimes referred to as cipher) may be performed in which a series of transformations or operations according to the cryptographic algorithm are performed on input data to be encrypted (e.g., a string of bits representing text, numbers, or other plaintext) using an encryption key to produce an output encrypted data. The encrypted data is also sometimes referred to as cipher text or cipher data. The encrypted data is generally unintelligible. It is generally not possible, or at least not practically feasible, to determine the unencrypted plaintext data from the encrypted data, without knowing the encryption key. If the cryptographic key is known, decryption (sometimes referred to as inverse cipher) may be performed on the encrypted data to reproduce the corresponding plaintext or unencrypted data. Commonly, the transformations or operations performed during decryption are substantially the reverse of the operations that were performed during encryption.
One known cryptographic algorithm is SMS4. SMS4 is a cryptographic algorithm promoted by the Chinese government for use in wireless networks. The SMS4 cryptographic algorithm is based on a block cipher. The input data, output data, and cryptographic key are each 128-bits. Block encryption and decryption are each performed through thirty-two rounds. Encryption and decryption have substantially the same structure except that the round key schedule for decryption is the reverse (e.g., goes in the opposite order) of the round key schedule for encryption. Further details of the SMS4 cryptographic algorithm, if desired, are available in the document “SMS4 Encryption Algorithm for Wireless Networks,” translated and typeset by Whitfield Diffie of SUN MICROSYSTEMS corporation and George Ledin of Sonoma State University, 15 May 2008, Version 1.03.